/**
 * 
 */
package com.xxl.job.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = XxlJobExecutorProperties.PREFIX)
public class XxlJobExecutorProperties {
	public static final String PREFIX = "xxl.job.executor";
	private String appname;
	private String address;
	private String ip;
	private int port;
	private String logPath = "logs/xxl-job";
	private int logRetentionDays = 7;
	private int logMaxFileSize = 500;

	/**
	 * @return the appname
	 */
	public String getAppname() {
		return appname;
	}

	/**
	 * @param appname the appname to set
	 */
	public void setAppname(String appname) {
		this.appname = appname;
	}

	/**
	 * @return the address
	 */
	public String getAddress() {
		return address;
	}

	/**
	 * @param address the address to set
	 */
	public void setAddress(String address) {
		this.address = address;
	}

	/**
	 * @return the ip
	 */
	public String getIp() {
		return ip;
	}

	/**
	 * @param ip the ip to set
	 */
	public void setIp(String ip) {
		this.ip = ip;
	}

	/**
	 * @return the port
	 */
	public int getPort() {
		return port;
	}

	/**
	 * @param port the port to set
	 */
	public void setPort(int port) {
		this.port = port;
	}

	/**
	 * @return the logPath
	 */
	public String getLogPath() {
		return logPath;
	}

	/**
	 * @param logPath the logPath to set
	 */
	public void setLogPath(String logPath) {
		this.logPath = logPath;
	}

	/**
	 * @return the logRetentionDays
	 */
	public int getLogRetentionDays() {
		return logRetentionDays;
	}

	/**
	 * @param logRetentionDays the logRetentionDays to set
	 */
	public void setLogRetentionDays(int logRetentionDays) {
		this.logRetentionDays = logRetentionDays;
	}

	/**
	 * @return the logMaxFileSize
	 */
	public int getLogMaxFileSize() {
		return logMaxFileSize;
	}

	/**
	 * @param logMaxFileSize the logMaxFileSize to set
	 */
	public void setLogMaxFileSize(int logMaxFileSize) {
		this.logMaxFileSize = logMaxFileSize;
	}

	@Override
	public String toString() {
		return "XxlJobExecutorProperties [appname=" + appname + ", address=" + address + ", ip=" + ip + ", port=" + port
				+ ", logPath=" + logPath + ", logRetentionDays=" + logRetentionDays + ", logMaxFileSize="
				+ logMaxFileSize + "]";
	}

}
